package com.shinewing.sconlyoffice.dao;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.Map;

@Repository
public class AttachmentDao {

    @Resource
    private JdbcTemplate jdbcTemplate;

    public Map<String, Object> findByDocId(String id) {
        String querySQL = "SELECT SCATTACHMENT_FULLPATH FROM SCATTACHMENT WHERE SCATTACHMENT_UUID=?";
        Map<String, Object> map = jdbcTemplate.queryForMap(querySQL, new Object[]{id});
        return map;
    }
}
